<?php
/**
 * Copyright © 2015 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */



/**
 * @var \Magento\Paypal\Block\Iframe $block
 * @see \Magento\Paypal\Block\Iframe
 */
?>
<html>
<head>
</head>
<body>
<script>
    (function() {
        'use strict';

        var cartUrl = '<?php echo $block->escapeUrl($block->getUrl('checkout/cart')); ?>',
            successUrl = '<?php echo $block->escapeUrl($block->getUrl('checkout/onepage/success')); ?>',
            goToSuccessPage = '<?php echo $block->escapeUrl($block->getGotoSuccessPage()); ?>',
            require = window.top.require,
            windowContext = window,
            errorMessage = {
                message: '<?php echo $block->escapeHtml($block->getErrorMsg()); ?>'
            };

        require([
            'underscore',
            'Magento_Paypal/js/model/iframe-redirect'
        ], function(_, iframeRedirect) {
            _.bind(iframeRedirect, windowContext)(cartUrl, errorMessage, goToSuccessPage, successUrl);
        })
    })();
</script>
</body>
</html>
